#ifndef REQUEST_DECORATOR_HH
# define REQUEST_DECORATOR_HH

#include "request.hh"

class RequestDecorator: public Request
{
public:
  RequestDecorator (Request* request);
  virtual ~RequestDecorator () = 0;

  virtual void operator() (RequestHandler* rh, const int* clientid = 0);

protected:
  boost::shared_ptr<Request> request_;
};

class ClientIdDecorator: public RequestDecorator
{
public:
  ClientIdDecorator (Request* request, const int* clientid);
  virtual ~ClientIdDecorator ();

  int clientid () const { return *(this->clientid_); }

  virtual void operator() (RequestHandler* rh, const int* clientid = 0);

protected:
  const int* clientid_;
};


#endif /// !REQUEST_DECORATOR_HH
